package com.blue.blog.api.service.impl;

import com.blue.blog.api.mapper.TagMapper;
import com.blue.blog.api.pojo.Tag;
import com.blue.blog.api.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TagServiceImpl implements TagService {
    @Autowired
    private TagMapper mapper;

    @Override
    public List<Tag> findAllTag() {
        return mapper.findAllTag();
    }

    @Override
    public Integer saveTag(Tag tag) {
        return mapper.saveTag(tag);
    }

    @Override
    public Integer updateTag(Tag tag) {
        return mapper.updateTag(tag);
    }

    @Override
    public Integer deleteTagById(Long id) {
        return mapper.deleteTagById(id);
    }

    @Override
    public Integer saveBlogTag(Long blogId, Long tagId) {
        return mapper.saveBlogTag(blogId, tagId);
    }
}
